import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/login/login'
import HomeLayout from '@/pages/layout/HomeLayout'
import NotFound from '@/pages/error/NotFound'
import IndexPage from '@/pages/layout/indexPage'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login,
    },
    {
      path: '/',
      name: '/',
      redirect: '/login',
    },
    {
      path: "/home",
      name: "home",
      component:HomeLayout,
      redirect: "/home/index",
      children:[
        {
          path:"/home/index",
          component:IndexPage,
        }
      ]
    },
    {
      path: '*',
      name: 'notFound',
      component: NotFound,
    }
  ]
})
